Well, yes that is right but not quite my problem. My datagrid has an checkbox on each row in the first cell (built in code). The problem occurs when I have selected multiple rows and click one of the checkbox cells (in which case I want all the selected to get checked :-)) I can check selected rows by putting a button or link outside the grid, but that is not "normal" windows behaviour.. Any ideas:confused:
hakonvik
Posts
-
Set checked state on all selected rows in datagridview -
Set checked state on all selected rows in datagridviewI'm struggling to get this to work.. Is it possible to set the checked state on all the selected rows in an datagridview at the same time (e.g. when the user selects multiple rows using ctrl+mouseclick)? Any help would be appreciated :-D
-
Large TXT filesHi You could consider using a backgroundworker to read the file, while showing a "loading" sign or something.. :-D basically something like: private void getTextFileWorker_DoWork(object sender, DoWorkEventArgs e) { //start to read the file, show loading sign... while(morelinesinfile) { this.Invoke(new AddValueDelegate(AddValue), new object[] { valueFromFile }); } } private void AddValue(string valueFromFile) { //do something with the value, add it to a list... } private void getTextFileWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { //finish up etc..hide sign.. } best regards HV
-
Executing JavaScript on asp:button_click eventYou can registrer the buttons onclick event by using button.Attributes.Add("onclick","DisplayAlert();"); If you now add the javascript function to the page's html and remove the original click event in code it should all work fine. HV
-
How to change Forecolor of the linkbutton control?You can add an attribute to the control using yourBtn.Attributes.Add("onclick","this.style.foreColor='#b8d7aa'"); ;) hv